﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;


/// <summary>
/// 获得.config中的数据库连接字符串
/// </summary>
public class ConfigManager
{
    private string dalConnectionString;

    ///	<summary>
    ///	获得连接字符串 
    ///	</summary>
    public string DALConnectionString
    {
        get
        {
            return dalConnectionString;
        }
    }

    public ConfigManager()
    {
        //通过配置类的AppSettings属性获取配置文件中数据库连接字符串并存储在ConnectionString中
        dalConnectionString = System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"];
    }
}